Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sorted-object

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sorted-object

Returns a copy of an object with its keys sorted

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
138K
decreased by-16.67%
Maintainers
1
Weekly downloads
 
Created

What is sorted-object?

The sorted-object npm package is a utility that allows you to sort the keys of an object in a consistent order. This can be particularly useful for tasks such as generating consistent JSON outputs, comparing objects, or ensuring predictable key order in serialized data.

What are sorted-object's main functionalities?

Sort Object Keys

This feature sorts the keys of an object in ascending order. The code sample demonstrates how to use the sorted-object package to sort the keys of a given object.

const sortedObject = require('sorted-object');
const obj = { b: 2, a: 1, c: 3 };
const sorted = sortedObject(obj);
console.log(sorted); // { a: 1, b: 2, c: 3 }

Other packages similar to sorted-object

Keywords

FAQs

Package last updated on 17 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc